package oop5;

/**
 * @author oldliu
 * @since 1.0
 */
public class Dog extends Pet {
    private String stype;//狗的品种

    public Dog(String name) {
        super.setName(name);
        //super.name = name;//error
    }

    public Dog(String name, String sex) {
        super.setName(name);
        super.sex = sex;//protected
    }

    public Dog(String name, int health, int love, String sex, String type) {
        super(name, health, love, sex);
        System.out.println("小狗的构造方法");
        this.stype = type;
    }

    //独有的eat
    public void eat() {
        System.out.println("狗吃骨头");
    }

    public void bite(GoodMan man) {
        System.out.println("小狗" + super.getName() + "咬了好人" + man.getName() + ",不识好人心");
    }

    @Override
    public void print() {
        System.out.println("这是一只狗");
        System.out.println("名字:" + getName());
        System.out.println("健康值：" + getHealth());
        System.out.println("可爱度：" + getLove());
        System.out.println("性别：" + sex);
    }
}
